<div class="featured-slider">
<div class="new_title center"><h2><span><?php echo $heading_title; ?></span></h2></div>
<a style="cursor:pointer" class="jcarousel-prev-horizontal1 prev_latest" ></a>
<a style="cursor:pointer" class="jcarousel-next-horizontal1 next_latest" ></a>


      <div id="owl-latest" class="products-grid">
        <?php foreach ($products as $product) { ?>
        <div class="item">
        <div class="item-inner">
          <div class="item-img">
            <div class="item-img-info"><a class="product-image" href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" class="img-responsive" /></a>
             <?php  global $config;
if($config->get('magikaccord_sale_label')==1){ 
if ($product['price'] && $product['special']) { ?>
<div class="new-label new-top-left"><?php echo $config->get('magikaccord_sale_labeltitle'); ?> </div>       
<?php }
} 
?>
<?php 
if (isset($this->request->get['route'])) { 
$route = $this->request->get['route']; 
}
if( !(strlen(strstr($route,'product/product'))>0) ){ ?>
              <div class="item-box-hover">
                <div class="box-inner">
                <?php if($config->get('magikaccord_quickview_button') == 1) { ?>
                <div class="product-detail-bnt"><a onclick="callQuickView('index.php?route=product/quickview&amp;product_id=<?php echo $product['product_id']; ?>');" class="button detail-bnt" type="button"><span>Quick View</span></a></div>
                <?php } ?>
                </div>
              </div>
<?php } ?>              
            </div>
          </div>

            <div class="item-info">
              <div class="info-inner">
                <div class="item-title"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
                <div class="item-content">
                  
                  <?php //if ($product['rating']) { ?>
                  <div class="rating">
                  <?php for ($i = 1; $i <= 5; $i++) { ?>
                  <?php if ($product['rating'] < $i) { ?>
                  <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span>
                  <?php } else { ?>
                  <span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span>
                  <?php } ?>
                  <?php } ?>
                  </div>
                  <?php //} ?>

                  <?php if ($product['price']) { ?>
                  <div class="item-price">
                  <div class="price-box">
                  <?php if (!$product['special']) { ?>
                  <span class="regular-price"><span class="price"><?php echo $product['price']; ?></span></span>
                  <?php } else { ?>
                  <span class="old-price"><span class="price"><?php echo $product['price']; ?></span></span>
                  <span class="special-price"><span class="price"><?php echo $product['special']; ?></span></span>
                  <?php } ?>
                  <?php /* if ($product['tax']) { ?>
                  <span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span>
                  <?php } */?>
                  </div></div>
                  <?php } ?>

                </div>
              </div>
              <div class="actions">
                <span class="add-to-links">
                  <a class="link-wishlist" style="cursor:pointer" type="button" data-toggle="tooltip" title="<?php echo $button_wishlist; ?>" onclick="wishlist.add('<?php echo $product['product_id']; ?>');"><span>Add to Wishlist</span></a>
                  <button type="button" class="button btn-cart" onclick="cart.add('<?php echo $product['product_id']; ?>');"><span><?php echo $button_cart; ?></span></button>
                  <a class="link-compare" style="cursor:pointer" type="button" data-toggle="tooltip" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product['product_id']; ?>');"><span>Add to Compare</span></a>
                </span>
              </div>
            </div>
          </div> 
        </div>
        <?php }?>
      </div>
   

</div><!-- best-sales-slider -->


<script type="text/javascript">


 

    $(document).ready(function() {
    var owlTwo = $("#owl-latest"); 
    $("#owl-latest").owlCarousel({items:4});

    $(".next_latest").click(function(){
        owlTwo.trigger('owl.next');
    });
    $(".prev_latest").click(function(){
        owlTwo.trigger('owl.prev');
    });

    });




</script>
